<%@page import="com.entity.Admin"%>
<%@page import="com.service.impl.AdminserviceImpl"%>
<%@page import="com.service.impl.Adminservice"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
request.setCharacterEncoding("utf-8");
String uid=request.getParameter("username");
String pwd=request.getParameter("password");
String realname=request.getParameter("realname");
Adminservice service=new AdminserviceImpl();
Admin admin=new Admin();
admin.setUsername(uid);
admin.setPassword(pwd);
admin.setRealname(realname);
int res=service.reg(admin);
if(res>0)
{
	out.print("注册失败");
}
else if(res==-1)
{
	out.print("你的账号已注册");
}
else
{
	out.print("注册成功");
}
%>
</body>
</html>